<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>WebSocket Demo</title>

    <script th:src="@{/js/jquery-3.2.1.min.js}"></script>

    <style>
        .h1 {
            text-shadow: 10px 10px 10px coral;
        }
        .border {
            border: solid coral;
            padding: 10px;
            background: blanchedalmond;
        }
    </style>
</head>

<body>
<h1 class="h1">Welcome</h1>
<p class="border">
    Reference: <br>
    <a href="http://www.cnblogs.com/bianzy/p/5822426.html">spring boot Websocket（使用笔记）</a>
</p>
<hr>
<div id="message">
    <input id="text" placeholder="Input message to be sent"/>
    <button onclick="send()">SEND</button>
    <button onclick="closeWebSocket()">ClOSE</button>
    <button onclick="connectWebSocket()">CONNECT</button>
    <div>
        Status: <label id="status-label"></label>
    </div>
</div>

<script th:src="@{/js/demo.js}"></script>
</body>
</html>